/* WorkCertified Support Agent – chat widget */
#wcsa-root {
	--wcsa-color: #1e6fd9;
	--wcsa-bg: #ffffff;
	--wcsa-text: #1d2327;
	--wcsa-muted: #646970;
	--wcsa-bot-bg: #f0f2f5;
	--wcsa-border: #dcdcde;
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99990;
	font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--wcsa-text);
}

#wcsa-root *,
#wcsa-root *::before,
#wcsa-root *::after {
	box-sizing: border-box;
}

.wcsa-launcher {
	width: 58px;
	height: 58px;
	border: 0;
	border-radius: 50%;
	background: var(--wcsa-color);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	margin-left: auto;
	padding: 0;
}

.wcsa-launcher.wcsa-has-photo {
	position: relative;
	background: #fff;
	border: 3px solid var(--wcsa-color);
}

.wcsa-launcher-photo {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}

.wcsa-launcher-badge {
	position: absolute;
	right: -4px;
	bottom: -4px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 2px solid #fff;
	background: var(--wcsa-color);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wcsa-launcher-badge svg {
	width: 13px;
	height: 13px;
}

.wcsa-launcher:focus-visible,
.wcsa-panel button:focus-visible,
.wcsa-input:focus-visible {
	outline: 2px solid var(--wcsa-color);
	outline-offset: 2px;
}

.wcsa-panel {
	position: absolute;
	right: 0;
	bottom: 72px;
	width: 370px;
	height: min(580px, calc(100vh - 110px));
	background: var(--wcsa-bg);
	border: 1px solid var(--wcsa-border);
	border-radius: 14px;
	box-shadow: 0 10px 34px rgba(0, 0, 0, 0.22);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.wcsa-panel[hidden] {
	display: none;
}

.wcsa-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	background: var(--wcsa-color);
	color: #fff;
}

.wcsa-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #fff;
	object-fit: contain;
}

.wcsa-title {
	flex: 1;
	font-weight: 600;
}

.wcsa-lang {
	display: flex;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 6px;
	overflow: hidden;
}

.wcsa-lang button {
	background: transparent;
	border: 0;
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 12px;
	line-height: 1;
	padding: 5px 7px;
}

.wcsa-lang button[aria-pressed="true"] {
	background: #fff;
	color: var(--wcsa-color);
	font-weight: 600;
}

.wcsa-disclaimer[hidden] {
	display: none;
}

.wcsa-new,
.wcsa-close {
	background: transparent;
	border: 0;
	color: #fff;
	cursor: pointer;
	padding: 4px 6px;
	font: inherit;
}

.wcsa-new {
	font-size: 13px;
	text-decoration: underline;
}

.wcsa-close {
	font-size: 24px;
	line-height: 1;
}

.wcsa-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wcsa-msg {
	max-width: 86%;
	padding: 9px 12px;
	border-radius: 12px;
	white-space: normal;
	overflow-wrap: anywhere;
}

.wcsa-msg a {
	color: inherit;
	text-decoration: underline;
}

.wcsa-bot {
	align-self: flex-start;
	background: var(--wcsa-bot-bg);
	border-bottom-left-radius: 4px;
}

.wcsa-user {
	align-self: flex-end;
	background: var(--wcsa-color);
	color: #fff;
	border-bottom-right-radius: 4px;
}

.wcsa-typing {
	color: var(--wcsa-muted);
	letter-spacing: 2px;
}

.wcsa-captcha {
	padding: 0 14px 8px;
}

.wcsa-form {
	display: flex;
	gap: 8px;
	padding: 10px 12px;
	border-top: 1px solid var(--wcsa-border);
	margin: 0;
}

.wcsa-input {
	flex: 1;
	resize: none;
	min-height: 40px;
	max-height: 120px;
	padding: 9px 10px;
	border: 1px solid var(--wcsa-border);
	border-radius: 8px;
	font: inherit;
	color: var(--wcsa-text);
	background: #fff;
}

.wcsa-send {
	border: 0;
	border-radius: 8px;
	padding: 0 16px;
	background: var(--wcsa-color);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.wcsa-send:disabled {
	opacity: 0.6;
	cursor: default;
}

.wcsa-disclaimer {
	padding: 0 12px 10px;
	font-size: 12px;
	color: var(--wcsa-muted);
}

@media (max-width: 480px) {
	#wcsa-root {
		right: 16px;
		bottom: 16px;
	}

	#wcsa-root.wcsa-is-open {
		inset: 0;
	}

	#wcsa-root.wcsa-is-open .wcsa-launcher {
		display: none;
	}

	.wcsa-panel {
		position: fixed;
		inset: 0;
		width: 100%;
		height: 100%;
		border-radius: 0;
		border: 0;
	}
}
